package config

import (
	"fmt"
	"github.com/mattermost/viper"
	"week3zk-project/rpc/global"
)

func InitConfig() {
	viper.SetConfigFile("../config/config.yaml")
	err := viper.ReadInConfig()
	if err != nil {
		panic("viper读取失败")
		return
	}
	viper.Unmarshal(&global.AppData.Nacos)
	fmt.Println("viper读取成功")
}
